#!/bin/sh

#Uninstall script
#$1: DESTDIR

DESTDIR="$1"

. ./common.sh

stateSet "Removing library metadata..."
rm -f "$DESTDIR/lib/pkgconfig/icecode-test.pc" 2>/dev/null
checkCommand $?

stateSet "Removing include files and directories..."
rm -rf  "$DESTDIR/include/icecode/test/" 2>/dev/null
checkCommand $?

stateSet "Removing the library..."
rm -f "$DESTDIR/lib/icecode-test.a" 2>/dev/null
checkCommand $?

if [ "$INSTALL_USER" = "root" ] ; then
    stateSet "Updating the library cache..."
    ldconfig
    checkCommand $?
fi

echo "Uninstall successful."
